Repository navigation
Let Batch.remove_queued_data_rows remove specific data rows - #2101
Merged
Merged
Conversation
remove_queued_data_rows() takes an optional data_row_ids list. With it, only those unlabeled rows leave the batch and the project; they stay in Catalog and other projects. If any of them is labeled or not in the batch, nothing is removed. Without it, every unlabeled row in the batch is removed, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gabefire
requested review from
KeshavSahoo,
cyrusj89,
jakefleming,
john-labelbox,
labelbox-engineering,
ramy1951 and
rma-eng-bot
November 18, 2026 16:34
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b5b60f0. Configure here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gmadaan-hue
approved these changes
Nov 20, 2026
Open
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

SDK half of per-row queue removal. The API half shipped in Labelbox/intelligence#32037.
Today the only way to take one unlabeled data row out of a project, without deleting it from Catalog, is
Batch.remove_queued_data_rows(). That removes every unlabeled row in the batch, so you had to record the batch's other rows, remove them all, and then re-batch them with matching consensus settings. Reported in #C910KT9B4.Changed
Batch.remove_queued_data_rows(data_row_ids=None):data_row_ids: unchanged. It sends the same mutation as before.data_row_ids: only those unlabeled rows leave the batch and the project. They stay in Catalog and in other projects.OperationNotAllowedExceptionnames those rows.ValueErrorif the list is empty (so[]never means "remove everything"), if a bare string is passed, or if a non-string id is passed.Labeled rows still have to be cleared first, for example with
label.delete()or Delete and requeue in the UI.Testing
tests/unit/test_unit_batch_remove_queued_data_rows.py(5 tests) passes locally.test_remove_specific_queued_data_rowsintests/integration/test_batch.pychecks three things: one row is removed, the other stays queued, and the removed row is still in Catalog. A second call naming the removed row raises and removes nothing. It runs against staging in CI.ruff formatand mypy pass onbatch.py.🤖 Generated with Claude Code
Note
Low Risk
Backward-compatible SDK API extension with client-side validation; queue removal behavior is unchanged when
data_row_idsis omitted.Overview
Extends
Batch.remove_queued_data_rowswith an optionaldata_row_idsargument so callers can drop specific unlabeled rows from a batch and the project queue instead of clearing the whole batch. Calling it with no args keeps the previous behavior and GraphQL mutation.When ids are provided, the client validates the input (non-empty list of strings, copies one-shot iterables) and calls
removeQueuedDataRowsFromBatchwithdataRowIds. The docstring now documents Catalog retention, the 10k cap, andValueError/OperationNotAllowedExceptioncases.Adds unit tests for both code paths and argument validation, plus an integration test that removes one row, leaves the rest queued, and errors on a second call that includes an already-removed id.
Reviewed by Cursor Bugbot for commit bacb559. Bugbot is set up for automated code reviews on this repo. Configure here.